package br.com.viamais.business;

import java.io.Serializable;
import java.util.List;

import br.com.viamais.model.Profile;

/**
 * Interface to profile business.
 * 
 * @author Eduardo
 */
public interface IProfileBO extends Serializable {

	/**
	 * Save or update a profile.
	 * 
	 * @param Profile
	 *            : profile.
	 * 
	 * @throws Throwable
	 *             : connection issues.
	 */
	public abstract void saveOrUpdate(Profile entity) throws Throwable;

	/**
	 * Get all profiles.
	 * 
	 * @throws Throwable
	 *             : connection issues.
	 */
	public abstract List<Profile> getAll() throws Throwable;

	/**
	 * Delete a profile.
	 * 
	 * @param Profile
	 *            : profile.
	 * 
	 * @throws Throwable
	 *             : connection issues.
	 */
	public abstract void delete(Profile profile) throws Throwable;

	/**
	 * Get by id.
	 * 
	 * @param Integer
	 *            : profile id.
	 * 
	 * @return Profile: profile.
	 * 
	 * @throws Throwable
	 *             : connection issues.
	 */
	public abstract Profile getById(Integer id) throws Throwable;

	/**
	 * Get all by content name.
	 * 
	 * @param String
	 *            : name.
	 * 
	 * @return List<Profile>: profile list.
	 * 
	 * @throws Throwable
	 *             : connection issues.
	 */
	public abstract List<Profile> getByName(String name) throws Throwable;
	
	/**
	 * Get unique result by name.
	 * 
	 * @param String: name.
	 * 
	 * @return Profile: profile.
	 * 
	 * @throws Throwable: connection issues.
	 */
	public abstract Profile getUniqueByName(String name) throws Throwable;

}